//
//  NBAMenu.m
//  NBA
//
//  Created by Jaedong on 2018/3/9.
//  Copyright © 2018年 Jaedong. All rights reserved.
//

#import "NBAMenu.h"
#import "NBAPopoverViewController.h"

@interface NBAMenu ()

@property (nonatomic, strong, readwrite) NBAPopoverViewController *controller;

@end

@implementation NBAMenu

- (instancetype)initWithTitle:(NSString *)aTitle{
    self = [super initWithTitle:aTitle];
    if (self){
        NSMenuItem *panelItem = [[NSMenuItem alloc]init];
        _controller = [[NBAPopoverViewController alloc]init];
        panelItem.view = _controller.view;
        [self addItem:panelItem];
    }
    return self;
}

- (void)refreshScore {
    [_controller refreshUIs];
}

@end
